From: Georges Basile Stavracas Neto Date: Tue, 15 Oct 2019 19:34:35 +0000 (+0200) Subject: authPrompt: Wiggle on failure X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~505 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b25a73c24392c98d75d5aa17ff08d08ae60fbea7;p=gnome-shell.git authPrompt: Wiggle on failure Add a wiggle effect to the password entry on failure. The parameters are set as per design review during GNOME Shell Hackfest 2019. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/768 --- diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 93a381056..5300c4318 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -6,6 +6,7 @@ const { Clutter, GObject, Pango, Shell, St } = imports.gi; const Animation = imports.ui.animation; const Batch = imports.gdm.batch; const GdmUtil = imports.gdm.util; +const Util = imports.misc.util; const Params = imports.misc.params; const ShellEntry = imports.ui.shellEntry; const UserWidget = imports.ui.userWidget; @@ -16,6 +17,10 @@ var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 300; var MESSAGE_FADE_OUT_ANIMATION_TIME = 500; +const WIGGLE_OFFSET = 6; +const WIGGLE_DURATION = 65; +const N_WIGGLES = 3; + var AuthPromptMode = { UNLOCK_ONLY: 0, UNLOCK_OR_LOG_IN: 1 @@ -256,6 +261,12 @@ var AuthPrompt = GObject.registerClass({ this.updateSensitivity(canRetry); this.setActorInDefaultButtonWell(null); this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED; + + Util.wiggle(this._entry, { + offset: WIGGLE_OFFSET, + duration: WIGGLE_DURATION, + wiggleCount: N_WIGGLES, + }); } _onVerificationComplete() {